// Element UI 按需导入及国际化
import Vue from 'vue'
import i18n from './lang'

import {
    Dialog,
    Form,
    FormItem,
    Input,
    Radio,
    RadioGroup,
    Button,
    Popover,
    Dropdown,
    DropdownMenu,
    DropdownItem,
    Progress,
    Container,
    Badge,
    Aside,
    Menu,
    MenuItem,
    Submenu,
    Main,
    Select,
    Option,
    Card,
    Table,
    TableColumn,
    Tag,
    DatePicker,
    Tabs,
    TabPane,
    Upload,
    Row,
    Col,
    Image,
    Tree,
    Header,
    Tooltip,
    Pagination,
    Switch,
    MessageBox,
    Drawer,
    CascaderPanel,
    Link,
    Breadcrumb,
    BreadcrumbItem,
    Cascader
} from 'element-ui'

Vue.use(Dialog)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(Button)
Vue.use(Popover)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Progress)
Vue.use(Container)
Vue.use(Badge)
Vue.use(Aside)
Vue.use(Menu)
Vue.use(MenuItem)
Vue.use(Submenu)
Vue.use(Main)
Vue.use(Select)
Vue.use(Option)
Vue.use(Card)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Tag)
Vue.use(DatePicker)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Upload)
Vue.use(Row)
Vue.use(Col)
Vue.use(Image)
Vue.use(Tree)
Vue.use(Header)
Vue.use(Tooltip)
Vue.use(Pagination)
Vue.use(Switch)
Vue.use(Drawer)
Vue.use(CascaderPanel)
Vue.use(Link)
Vue.use(Breadcrumb)
Vue.use(BreadcrumbItem)
Vue.use(Cascader)

Vue.prototype.$confirm = MessageBox.confirm

Vue.use(
    Dialog,
    Form,
    FormItem,
    Input,
    Radio,
    RadioGroup,
    Button,
    Popover,
    Dropdown,
    DropdownMenu,
    DropdownItem,
    Progress,
    Container,
    Badge,
    Aside,
    Menu,
    MenuItem,
    Submenu,
    Main,
    Select,
    Option,
    Card,
    Table,
    TableColumn,
    Tag,
    DatePicker,
    Tabs,
    TabPane,
    Upload,
    Row,
    Col,
    Image,
    Tree,
    Header,
    Tooltip,
    Pagination,
    Switch,
    Drawer,
    CascaderPanel,
    Link,
    Breadcrumb,
    BreadcrumbItem,
    Cascader,
    {  i18n: (key, value) => i18n.t(key, value) }
)
